package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.ScenarioBusinessComponentRelaMapper;
import com.ruoyi.business.domain.ScenarioBusinessComponentRela;
import com.ruoyi.business.service.IScenarioBusinessComponentRelaService;

/**
 * 场景组和业务组件关系表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-02
 */
@Service
public class ScenarioBusinessComponentRelaServiceImpl implements IScenarioBusinessComponentRelaService 
{
    @Autowired
    private ScenarioBusinessComponentRelaMapper scenarioBusinessComponentRelaMapper;

    /**
     * 查询场景组和业务组件关系表
     * 
     * @param id 场景组和业务组件关系表主键
     * @return 场景组和业务组件关系表
     */
    @Override
    public ScenarioBusinessComponentRela selectScenarioBusinessComponentRelaById(Long id)
    {
        return scenarioBusinessComponentRelaMapper.selectScenarioBusinessComponentRelaById(id);
    }

    /**
     * 查询场景组和业务组件关系表列表
     * 
     * @param scenarioBusinessComponentRela 场景组和业务组件关系表
     * @return 场景组和业务组件关系表
     */
    @Override
    public List<ScenarioBusinessComponentRela> selectScenarioBusinessComponentRelaList(ScenarioBusinessComponentRela scenarioBusinessComponentRela)
    {
        return scenarioBusinessComponentRelaMapper.selectScenarioBusinessComponentRelaList(scenarioBusinessComponentRela);
    }

    /**
     * 新增场景组和业务组件关系表
     * 
     * @param scenarioBusinessComponentRela 场景组和业务组件关系表
     * @return 结果
     */
    @Override
    public int insertScenarioBusinessComponentRela(ScenarioBusinessComponentRela scenarioBusinessComponentRela)
    {
        scenarioBusinessComponentRela.setCreateTime(DateUtils.getNowDate());
        return scenarioBusinessComponentRelaMapper.insertScenarioBusinessComponentRela(scenarioBusinessComponentRela);
    }

    /**
     * 修改场景组和业务组件关系表
     * 
     * @param scenarioBusinessComponentRela 场景组和业务组件关系表
     * @return 结果
     */
    @Override
    public int updateScenarioBusinessComponentRela(ScenarioBusinessComponentRela scenarioBusinessComponentRela)
    {
        scenarioBusinessComponentRela.setUpdateTime(DateUtils.getNowDate());
        return scenarioBusinessComponentRelaMapper.updateScenarioBusinessComponentRela(scenarioBusinessComponentRela);
    }

    /**
     * 批量删除场景组和业务组件关系表
     * 
     * @param ids 需要删除的场景组和业务组件关系表主键
     * @return 结果
     */
    @Override
    public int deleteScenarioBusinessComponentRelaByIds(Long[] ids)
    {
        return scenarioBusinessComponentRelaMapper.deleteScenarioBusinessComponentRelaByIds(ids);
    }

    /**
     * 删除场景组和业务组件关系表信息
     * 
     * @param id 场景组和业务组件关系表主键
     * @return 结果
     */
    @Override
    public int deleteScenarioBusinessComponentRelaById(Long id)
    {
        return scenarioBusinessComponentRelaMapper.deleteScenarioBusinessComponentRelaById(id);
    }
}
